
strlen.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <point_strlen>:
#include <string.h>
#include <stdio.h>

void point_strlen(char * src)
{
   0:	e92d4800 	push	{fp, lr}
   4:	e28db004 	add	fp, sp, #4
   8:	e24dd008 	sub	sp, sp, #8
   c:	e50b0008 	str	r0, [fp, #-8]
    printf("src length = %ld\n", strlen(src));
  10:	e51b0008 	ldr	r0, [fp, #-8]
  14:	ebfffffe 	bl	0 <strlen>
  18:	e1a03000 	mov	r3, r0
  1c:	e1a01003 	mov	r1, r3
  20:	e59f0008 	ldr	r0, [pc, #8]	; 30 <point_strlen+0x30>
  24:	ebfffffe 	bl	0 <printf>
}
  28:	e24bd004 	sub	sp, fp, #4
  2c:	e8bd8800 	pop	{fp, pc}
  30:	00000000 	.word	0x00000000

00000034 <sizeof_strlen>:

int sizeof_strlen()
{
  34:	e92d4800 	push	{fp, lr}
  38:	e28db004 	add	fp, sp, #4
  3c:	e24dd008 	sub	sp, sp, #8
    char *mesg = "Don't be a fool!";
  40:	e59f306c 	ldr	r3, [pc, #108]	; b4 <sizeof_strlen+0x80>
  44:	e50b3008 	str	r3, [fp, #-8]
    char *copy;

    copy = mesg;
  48:	e51b3008 	ldr	r3, [fp, #-8]
  4c:	e50b300c 	str	r3, [fp, #-12]

    printf("%s\n", copy);			// Don't be a fool!
  50:	e51b300c 	ldr	r3, [fp, #-12]
  54:	e1a00003 	mov	r0, r3
  58:	ebfffffe 	bl	0 <puts>
    printf("mesg = %s : &mesg = %p : value = %p\n", mesg, &mesg, mesg); // mesg = Don't be a fool! : &mesg = 0x7ffd7cd2ba20 : value = 0x4008ca
  5c:	e51b1008 	ldr	r1, [fp, #-8]
  60:	e51b3008 	ldr	r3, [fp, #-8]
  64:	e24b2008 	sub	r2, fp, #8
  68:	e59f0048 	ldr	r0, [pc, #72]	; b8 <sizeof_strlen+0x84>
  6c:	ebfffffe 	bl	0 <printf>
    printf("copy = %s : &copy = %p : value = %p\n", copy, &copy, copy);	// copy = Don't be a fool! : &copy = 0x7ffd7cd2ba28 : value = 0x4008ca
  70:	e51b100c 	ldr	r1, [fp, #-12]
  74:	e51b300c 	ldr	r3, [fp, #-12]
  78:	e24b200c 	sub	r2, fp, #12
  7c:	e59f0038 	ldr	r0, [pc, #56]	; bc <sizeof_strlen+0x88>
  80:	ebfffffe 	bl	0 <printf>
    printf("sizeof(mesg) = %ld : strlen(mesg) : %ld\n", sizeof(mesg), strlen(mesg));	// sizeof(mesg) = 8 : strlen(mesg) : 16
  84:	e51b3008 	ldr	r3, [fp, #-8]
  88:	e1a00003 	mov	r0, r3
  8c:	ebfffffe 	bl	0 <strlen>
  90:	e1a03000 	mov	r3, r0
  94:	e1a02003 	mov	r2, r3
  98:	e3a01004 	mov	r1, #4
  9c:	e59f001c 	ldr	r0, [pc, #28]	; c0 <sizeof_strlen+0x8c>
  a0:	ebfffffe 	bl	0 <printf>

    return 0;
  a4:	e3a03000 	mov	r3, #0
}
  a8:	e1a00003 	mov	r0, r3
  ac:	e24bd004 	sub	sp, fp, #4
  b0:	e8bd8800 	pop	{fp, pc}
  b4:	00000014 	.word	0x00000014
  b8:	00000028 	.word	0x00000028
  bc:	00000050 	.word	0x00000050
  c0:	00000078 	.word	0x00000078

000000c4 <main>:


int main()
{
  c4:	e92d4800 	push	{fp, lr}
  c8:	e28db004 	add	fp, sp, #4
  cc:	e24dd018 	sub	sp, sp, #24
	char *haystack = "aaa|0bbb||ccc||eee";
  d0:	e59f3110 	ldr	r3, [pc, #272]	; 1e8 <main+0x124>
  d4:	e50b3008 	str	r3, [fp, #-8]
	char str[] = {0x31, 0x31, 0x00, 0x33};
  d8:	e59f210c 	ldr	r2, [pc, #268]	; 1ec <main+0x128>
  dc:	e24b3014 	sub	r3, fp, #20
  e0:	e1a01002 	mov	r1, r2
  e4:	e3a02004 	mov	r2, #4
  e8:	e1a00003 	mov	r0, r3
  ec:	ebfffffe 	bl	0 <memcpy>
	unsigned char monitor3[] = {0x55, 0xaa, 0xaa, 0x01, 0x33, 0x4d, 0x61};
  f0:	e59f20f8 	ldr	r2, [pc, #248]	; 1f0 <main+0x12c>
  f4:	e24b301c 	sub	r3, fp, #28
  f8:	e1a01002 	mov	r1, r2
  fc:	e3a02007 	mov	r2, #7
 100:	e1a00003 	mov	r0, r3
 104:	ebfffffe 	bl	0 <memcpy>
	char num = '3';
 108:	e3a03033 	mov	r3, #51	; 0x33
 10c:	e54b3009 	strb	r3, [fp, #-9]
	int result;

	printf( "%ld\n ", strlen(haystack));	// 18
 110:	e51b0008 	ldr	r0, [fp, #-8]
 114:	ebfffffe 	bl	0 <strlen>
 118:	e1a03000 	mov	r3, r0
 11c:	e1a01003 	mov	r1, r3
 120:	e59f00cc 	ldr	r0, [pc, #204]	; 1f4 <main+0x130>
 124:	ebfffffe 	bl	0 <printf>
	printf( "%ld\n ", strlen(str));			// 2
 128:	e24b3014 	sub	r3, fp, #20
 12c:	e1a00003 	mov	r0, r3
 130:	ebfffffe 	bl	0 <strlen>
 134:	e1a03000 	mov	r3, r0
 138:	e1a01003 	mov	r1, r3
 13c:	e59f00b0 	ldr	r0, [pc, #176]	; 1f4 <main+0x130>
 140:	ebfffffe 	bl	0 <printf>
    printf( "%ld\n ", strlen(monitor3));	// 7
 144:	e24b301c 	sub	r3, fp, #28
 148:	e1a00003 	mov	r0, r3
 14c:	ebfffffe 	bl	0 <strlen>
 150:	e1a03000 	mov	r3, r0
 154:	e1a01003 	mov	r1, r3
 158:	e59f0094 	ldr	r0, [pc, #148]	; 1f4 <main+0x130>
 15c:	ebfffffe 	bl	0 <printf>

	printf( "%ld\n ", sizeof(haystack));	// 8
 160:	e3a01004 	mov	r1, #4
 164:	e59f0088 	ldr	r0, [pc, #136]	; 1f4 <main+0x130>
 168:	ebfffffe 	bl	0 <printf>
	printf( "%ld\n ", sizeof(str));			// 4
 16c:	e3a01004 	mov	r1, #4
 170:	e59f007c 	ldr	r0, [pc, #124]	; 1f4 <main+0x130>
 174:	ebfffffe 	bl	0 <printf>
    printf( "%ld\n ", sizeof(monitor3));	// 7
 178:	e3a01007 	mov	r1, #7
 17c:	e59f0070 	ldr	r0, [pc, #112]	; 1f4 <main+0x130>
 180:	ebfffffe 	bl	0 <printf>
	
	printf( "%x\n ", monitor3[7-2]);		// 0x4d
 184:	e55b3017 	ldrb	r3, [fp, #-23]	; 0xffffffe9
 188:	e1a01003 	mov	r1, r3
 18c:	e59f0064 	ldr	r0, [pc, #100]	; 1f8 <main+0x134>
 190:	ebfffffe 	bl	0 <printf>

	printf("%c, %d, 0x%x\n", num, num, num);	// 3, 51, 0x33
 194:	e55b1009 	ldrb	r1, [fp, #-9]
 198:	e55b2009 	ldrb	r2, [fp, #-9]
 19c:	e55b3009 	ldrb	r3, [fp, #-9]
 1a0:	e59f0054 	ldr	r0, [pc, #84]	; 1fc <main+0x138>
 1a4:	ebfffffe 	bl	0 <printf>

	result = num - '0';			// 51 - 48 = 3
 1a8:	e55b3009 	ldrb	r3, [fp, #-9]
 1ac:	e2433030 	sub	r3, r3, #48	; 0x30
 1b0:	e50b3010 	str	r3, [fp, #-16]
	printf("%d\n", result);		// 3
 1b4:	e51b1010 	ldr	r1, [fp, #-16]
 1b8:	e59f0040 	ldr	r0, [pc, #64]	; 200 <main+0x13c>
 1bc:	ebfffffe 	bl	0 <printf>

    point_strlen(haystack);		// 18
 1c0:	e51b0008 	ldr	r0, [fp, #-8]
 1c4:	ebfffffe 	bl	0 <point_strlen>
	point_strlen(str);			// 2
 1c8:	e24b3014 	sub	r3, fp, #20
 1cc:	e1a00003 	mov	r0, r3
 1d0:	ebfffffe 	bl	0 <point_strlen>

    sizeof_strlen();
 1d4:	ebfffffe 	bl	34 <sizeof_strlen>

	return 0;
 1d8:	e3a03000 	mov	r3, #0
}
 1dc:	e1a00003 	mov	r0, r3
 1e0:	e24bd004 	sub	sp, fp, #4
 1e4:	e8bd8800 	pop	{fp, pc}
 1e8:	000000a4 	.word	0x000000a4
 1ec:	000000dc 	.word	0x000000dc
 1f0:	000000e0 	.word	0x000000e0
 1f4:	000000b8 	.word	0x000000b8
 1f8:	000000c0 	.word	0x000000c0
 1fc:	000000c8 	.word	0x000000c8
 200:	000000d8 	.word	0x000000d8
